#include"my_Udp_server.hpp"

string executeFunction(string& s)
{
    string tmp;
    auto it=s.begin();
    while(it!=s.end())
    {
        if(islower(*it))
        {
            *it+='A'-'a';
            tmp.push_back(*it);
        }
        else
        {
            tmp.push_back(*it);
        }
        ++it;
    }
    return tmp;
}

int main(int arg,char* args[])
{
    uint16_t port=atoi(args[1]);
    // cout<<"你好！我是服务端！\n";
    //unique_ptr<UdpServer> usvr(new UdpServer(executeFunction,port));
    unique_ptr<UdpServer> usvr(new UdpServer(port));
    // usvr->Init();
    usvr->Start();
    usvr->Recv();

    return 0;
}